import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

class Bank {
    long[] balance;

    public Bank(long[] balance) {
        this.balance = balance;
    }

    public boolean transfer(int account1, int account2, long money) {
        if (account1 > balance.length || account2 > balance.length ||
                balance[account1 - 1] < money) {
            return false;
        }
        balance[account1 - 1] -= money;
        balance[account2 - 1] += money;
        return true;
    }

    public boolean deposit(int account, long money) {
        if (account > balance.length) {
            return false;
        }
        balance[account - 1] += money;
        return true;
    }

    public boolean withdraw(int account, long money) {
        if (account > balance.length || balance[account - 1] < money) {
            return false;
        }
        balance[account - 1] -= money;
        return true;
    }

}


class MainClass {
    public static int[] stringToIntegerArray(String input) {
        // 去除开始最后的空格等字符
        input = input.trim();
        // 去掉 【】 字符
        input = input.substring(1, input.length() - 1);
        if (input.length() == 0) {
            return new int[0];
        }

        String[] parts = input.split(",");
        int[] output = new int[parts.length];
        for (int index=0; index<parts.length; index++) {
            String part = parts[index].trim();
            output[index] = Integer.parseInt(part);
        }

        return output;
    }

    public static int[][] stringTo2dIntegerArray(String input) {
        // 去除开始最后的空格等字符
        input = input.trim();
        // 去掉 【】 字符
        input = input.substring(1, input.length() - 1);
        if (input.length() == 0) {
            return new int[0][0];
        }

        String[] parts = input.split(",");
        // 二维数组行列长度都要先赋值吗？??
        int[][] output2d = new int[parts.length][];

        for (int index=0; index<parts.length; index++) {
            String part = parts[index].trim();
            output2d[index] = stringToIntegerArray(part);
        }

        return output2d;
    }

    public static String[] stringToStringArray(String input) {
        // 去除开始最后的空格等字符
        input = input.trim();
        // 去掉 【】 字符
        input = input.substring(1, input.length() - 1);
        if (input.length() == 0) {
            return new String[0];
        }

        String[] output = input.split(",");

        return output;
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br =
                new BufferedReader(new InputStreamReader(System.in,
                        StandardCharsets.UTF_8.name()));
        String line;
        while ((line = br.readLine()) != null) {
            String[] command = stringToStringArray(line);
            System.out.println(command);
            // String out = String.valueOf(command);
            // System.out.println(out);

            int[][] bank = stringTo2dIntegerArray(br.readLine());
            System.out.println(bank);
            // 有空测试测试，再考虑下3维的整形数组.....????
        }
    }

}
